package com.service.yzj.model.pages.wx;
// import com.service.yzj.model.basic.*;
// import lombok.Data;
// import java.io.Serializable;

import java.io.IOException;

/**
 * 模块类型，icon;banner;list
 */
public enum HomeModuleType {
    BANNER, 
    ICON, 
    LIST;

    public String toValue() {
        switch (this) {
            case BANNER: return "banner";
            case ICON: return "icon";
            case LIST: return "list";
        }
        return null;
    }

    public static HomeModuleType forValue(String value) throws IOException {
        if (value.equals("banner")) return BANNER;
        if (value.equals("icon")) return ICON;
        if (value.equals("list")) return LIST;
        throw new IOException("Cannot deserialize Type");
    }
}
